HelpControl   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 18
c 0
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

2 Functions

Rating   Name   Duplication   Size   Complexity  
A handleButtonClick 0 3 1
A render 0 14 1
1
import React from 'react'
2
import ReactSVG from 'react-svg'
3
import PropTypes from 'prop-types'
4
import account from '../images/account.svg'
5
6
class HelpControl extends React.Component {
7
  handleButtonClick() {
8
    location.href =
9
      'https://arizona-primo.hosted.exlibrisgroup.com/primo-explore/account?vid=01UA&section=overview'
10
  }
11
12
  render() {
13
    return (
14
      <div className="header__control">
15
        <button
16
          className="header__control-button"
17
          onClick={this.handleButtonClick}
18
        >
19
          <div className="header__control-icon">
20
            <ReactSVG path={account} />
21
          </div>
22
          My account
23
        </button>
24
      </div>
25
    )
26
  }
27
}
28
29
export default HelpControl
30